﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using WPFExcelReport.Helpers;
using System.Collections.Generic;
namespace WPFExcelReport
{
    public partial class TNOFVA
    {

        public TNOFVA()
        {

            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VVAART();
            this.DataContext = MV;
            InitializeComponent();
        }

        public override void LOADBYAUF()
        {
            base.LOADBYAUF();
            if (ORDERNUM.Length < 29)
                return;
            if (TBMain.Rows.Count > 0)
                return; 
            PM["KOLL"] = ORDERNUM.Substring(0, 5);
            PM["ART"] = ORDERNUM.Substring(5, 24);
            PM["DES"] = DES.Trim().PadRight(30);
            TMV.AUTOCHK(PM);
            vwMaster.View.MoveCurrentToFirst();
        }
    }
}
